<?php

require_once('Search/protoType.php');

class Search_CommentType extends protoType {
	protected $fields = array(
	'text',
	);

	public function makeSearchData( $oid ) {
		if ( !$this->rh->search_in_comments ) {
			return true;
		}

		if ( !isset($this->object->data['item_oid'])
		|| empty($this->object->data['item_oid']) ) {
			return false;
		}

		$this->parent_oid = $this->object->data['item_oid'];

		return parent::makeSearchData($oid);
	}
}